package exception;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/**
 * 说明:
 *
 * @author:SuZhongHe
 * @date:2023/3/9
 **/
public class AutoCloseableDemo {
    public static void main(String[] args) {
        System.out.println("程序开始了");
        try (FileOutputStream fos = new FileOutputStream("111.txt");){
            fos.write(1);
        } catch (Exception e) {
            e.printStackTrace();
        }


        System.out.println("程序结束了");
    }
}
